home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / 1N5HK0H (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  1.9 KB  |  34 lines

  1. package com.sun.java.swing.plaf.basic;
  2.  
  3. import com.sun.java.swing.AbstractAction;
  4. import com.sun.java.swing.JOptionPane;
  5. import java.awt.event.ActionEvent;
  6. import java.io.File;
  7. import java.io.IOException;
  8.  
  9. class BasicFileChooserUI$NewFolderAction extends AbstractAction {
  10.    // $FF: synthetic field
  11.    BasicFileChooserUI this$0;
  12.  
  13.    // $FF: synthetic method
  14.    protected BasicFileChooserUI$NewFolderAction(BasicFileChooserUI this$0) {
  15.       super("New Folder");
  16.       this.this$0 = this$0;
  17.    }
  18.  
  19.    public void actionPerformed(ActionEvent e) {
  20.       File currentDirectory = this.this$0.getFileChooser().getCurrentDirectory();
  21.       File newFolder = null;
  22.  
  23.       try {
  24.          newFolder = this.this$0.getFileChooser().getFileSystemView().createNewFolder(currentDirectory);
  25.       } catch (IOException var5) {
  26.          JOptionPane.showMessageDialog(this.this$0.getFileChooser(), "Error creating new folder: " + var5, "Error Creating New Folder", 0);
  27.          return;
  28.       }
  29.  
  30.       this.this$0.getFileChooser().rescanCurrentDirectory();
  31.       this.this$0.getFileChooser().ensureFileIsVisible(newFolder);
  32.    }
  33. }
  34.